Miscellaneous Tools And Scripts
...
Settings And Tweaks
Material Decorations ... . To ensure the GTK theme matches Material Decorations for applications with headers (still using Breeze as the GTK theme), edit ~/.config/gtk-3.0/gtk.css
to remove the corner radius. Unfortunately, there is currently no support for Wayland.
.titlebar, .titlebar .background { border-top-left-radius: 0px, border-top-right-radius: 0px, border-bottom-left-radius: 0px, border-bottom-right-radius: 0px; }
Exec=env MOZ_ENABLE_WAYLAND=1 /usr/lib/firefox/firefox %u
Exec=code --enable-features=UseOzonePlatform --ozone-platform=wayland
To automatically mount external or internal devices or drives at the start of a session, it is usually necessary to run an auto-start command. Unfortunately, this cannot be performed using the mount
command, because this requires root permissions. Fortunately, this can be performed using the udisks2
package, where the device name (/dev/sdXY
) or UUID is used to identify the device to be mounted. This package provides a daemon, tools, and libraries to access and manipulate devices and drives. It is recommended to use the UUID of the device since this is less likely to change, as the device name may change if other devices are mounted or port of the device is changed. A disadvantage of using udisksctl
is that the device will automatically be mounted at /media/
and this cannot be changed.
Swap File Creation
A swap is disk space used to extend the amount of memory available for running programs. Without a swap, applications will be terminated up to and including the entire system crashing if there is a lack of memory. With a swap available to the system, the kernel can take less frequently accessed memory pages from inactive applications or services and write them to disk to allow more memory to be available for active applications. Although not always required, a swap would be beneficial for most systems - if hibernation is used, then a swap is always required to at least be the size of memory (due to diminishing returns, the swap should generally not be greater than twice the size of memory).
A swap can be created as a partition or file. In almost all cases, a swap as a file is preferable, as it allows for simple resizing of the size of the swap if necessary. This involves creating and initializing the file to hold the swap, setting the appropriate permissions on the file (readable and writable only by root), formatting and enabling the swap, and ensuring the swap is enabled at boot (if it is not replacing an existing swap). It should be noted that there is no performance difference between using a swap as a partition or file. It should be noted that, if using a swap file, it is unnecessary to create a swap partition during the installation process.
The frequency at which the system swaps data out of memory to the swap space can be configured with the swappiness parameter. ... .
sudo fallocate -l 16G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab
sudo swapon --show free -h
Custom Email Configuration
Using a registered domain at a domain name system provider, it is possible to use email forwarding in combination with an email ...hosting... service to receive and send emails from a custom domain name. In some cases and if applicable, a catch-all target email address can be set up using a wildcard. It should be noted that, based on the domain name system provider, there may be restrictions around the functionality and c, such as the number of email addresses which can be forwarded, rate at which emails are forwarded, or size of attachments on emails (currently respectively at 100 emails, 500 emails per hour, and 20.97MB for Namecheap).
- Create an account at Gmail (might be possible with other email ...hosting... services). This will serve as the backend email address for storing emails which are received and sending emails from the target email address.
- ...App token...
- Set up email forwarding or routing using the domain name system provider, such as Cloudfare or Namecheap. This should be configured to automatically forward emails sent to a target email address to the backend email address of the email ...hosting... service. For example, this should forward emails sent to
contact@example.com
tobackend@gmail.com
. - In Gmail, navigate to Settings, See All Settings, Accounts And Import, Send Mail As, and Add Another Email Address. In the dialog window which pops up, enter a name and target email address as
contact@example.com
(in most cases, Treat As Alias can be left ticked and will allow logging into the Gmail account using the target email address). For the SMTP servers, enter the name assmtp.gmail.com
, username asbackend
, and password as the app token (in most cases, Secured Connection Using TLS can be left ticked). - Finally, if using an email client, an identify needs to be configured. Thunderbird.